package com.qf.purchase.service;

import com.qf.purchase.dao.ProviceDao;
import com.qf.purchase.po.Provice;
import com.qf.purchase.service.ProviceService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * Copyright (C),2022
 * FileName: ProviceServiceImpl
 * Author: ding
 * Date:2022/5/7 10:49
 */
@Service
public class ProviceServiceImpl implements ProviceService {
    @Resource
    ProviceDao proviceDao;

    @Override
    public boolean addProvice(Provice provice) {
        return proviceDao.addProvice(provice)>0;
    }

    @Override
    public boolean updateProvice(Provice provice) {
        return proviceDao.updateProvice(provice)>0;
    }

    @Override
    public List<Provice> getAllProviceByPage(Map map) {
        return proviceDao.getAllProviceByPage(map);
    }

    @Override
    public Provice getProviceByName(String name) {
        return proviceDao.getProviceByName(name);
    }

    @Override
    public Provice getProviceById(int id) {
        return proviceDao.getProviceById(id);
    }
}
